This chapter provides information on various scripts used by the Cisco’s Policy Provisioning Tool (PPT) for performing different administrative tasks. However most of the scripts are specific to perform certain operations including database backup, restore, vacuuming, and resetting superuser password, some of them provide log information for troubleshooting purpose. All of these scripts except the PPT Components Control (pptctl) Script are located in the “scripts” folder in the PPT installation directory <PPT_install_dir>.Important: The user must have PPT administrator privileges to run/execute all of the above listed scripts.
• start: starts the specified process or all processes.
• stop: stops the specified process or all processes.
• restart: restarts the specified process or all processes.
• forcestop: forcefully stops the specified process or all processes.
• status: checks the running status of the specified process or all processes.Caution: If the process name is not mentioned before any of the above mentioned operation/action, the respective action is taken for all the policy provisioning processes.
pptctl [ postgres | apache | psmon | notif_server ] [ start | stop | restart | forcestop | status ] | [ version ] | [ --help ]./set_superuser_password [ --help ]password:new_passwordCaution: If you enter the same old password when prompted to enter the new superuser password, following messages are displayed:
Execute the script and provide any of the above mentioned options. For backup option <backup_dir_path> is mandatory. The script takes backup of PPT database and copies configuration files, creates a tar ball and compresses the file. The file is created at the location specified by the user. If the backup operation fails, SNMP traps are sent. Details of traps can be found in ‘Trap Details’ table below. For more detailed information traps, please refer CISCO-PPT-MIB.txt file located at the <PPT-install-dir>/mib/ directory. The success/failure messages are displayed and the traps are sent for specific error conditions.
starPPTDBBackupDestinationNotAccessible: Backup directory is not accessible or PPT administrator does not have enough permissions to access it. starPPTDBBackupNotEnoughDiskSpace: The disk on which backup is to be taken is full. ./backupAndRestore.sh backup backup_dir_pathDuring PPT installation a cron entry for backup script is added. By default, the backup time interval is configured as 1 day. This time interval can be modified using the script: <PPT-install-dir>/scripts/updateBackupInterval.sh. By default backup is taken at midnight for daily backup. In casae the backup interval is modified by user, the backup will be taken at following timeupdateBackupInterval.sh [ --help ]Number of days for which the data is to be retained. Default is 30 days, minimum is 2 days, and maximum is 30 days. Therefore the number_of_days ranges from 2 to 30.Execute the script with or without the --days option followed by the number of days for which records are to be retained. For example, to delete all records older than 5 days:Caution: Running this script results in purging the data which would neither be available nor be recovered.
vacuum [ --help ]Password:postgres_passwordCaution: When prompted for the password, you are required to enter the correct Postgres password. In case you enter an incorrect password, following message is displayed:
configSnmpTarget.sh [ --help ]IP address:1.2.3.4Port: 667Community: testThe purpose of this script is to collect debug information for PPT. The script collects different log files and captures output of certain system commands that would help in better debugging of a particular issue. Executing this script collects the required information and prepares a gzip file named “<project_name>supportDetails.tar.gz” file in the /tmp directory.Important: The gzip file is supposed to be attached in the problem report (PR) while reporting a problem in the customer setup.
The gzip file name and the directory in which this gzip file is created, are configurable via an XML file./getSupportDetails.pl [ --level = level_number ] [ --xmlfile = xml_filename ] [ --outputDir = outpur_dir_path ] [ --verbose ] [ --help ]
•
•
•
•
• Specifies the XML file to be used to collect the log information. Default: getSupportDetails.xml in same directory as script. XML file allows the user to configure the gzip file name and directory where the gzip file will be created.Uses specified directory output_dir_path as destination to collect logs. Default: /tmp/ as output directory to collect logs.
|
| Cisco Systems Inc. |
| Tel: 408-526-4000 |
| Fax: 408-527-0883 |